﻿using System.ComponentModel;
using StepsManagerLibrary.Enum;

namespace StepsManagerLibrary.Interfaces
{
    /// <summary>
    /// Defines a set of methods of an object representing a Step
    /// </summary>
    public interface IStepControl :
        IObservable<StepControlStateEnum>,
        INotifyPropertyChanged, 
        IActionInitiator,
        INotifyAction
    {
        #region Properties

        /// <summary>
        /// Name given to the current Step
        /// </summary>
        string Title { get; }

        /// <summary>
        /// Current state of the control
        /// </summary>
        StepControlStateEnum State { get; set; }

        #endregion

        #region Initialization

        /// <summary>
        /// Initialize the Step
        /// </summary>
        /// <returns>The initialization has been successful</returns>
        bool Initialize();

        #endregion

        #region Navigation checks

        /// <summary>
        /// Check whether you can currently move to
        /// the step
        /// </summary>
        /// <returns>Whether we can move to this step.</returns>
        bool CanMoveIn();

        /// <summary>
        /// Check whether you can currently move from
        /// the current step
        /// </summary>
        /// <returns>Whether we can move from this step.</returns>
        bool CanMoveOut();

        #endregion

        #region Navigation

        /// <summary>
        /// Method called before MoveIn method is called
        /// </summary>
        bool BeforeMovingIn();

        /// <summary>
        /// Moving in to the step
        /// </summary>
        bool MoveIn();

        /// <summary>
        /// Method called after the MoveIn method has terminated
        /// </summary>
        bool AfterMovingIn();

        /// <summary>
        /// Method called before the MoveOut method is called
        /// </summary>
        bool BeforeMovingOut();

        /// <summary>
        /// MovOutg Out to the step
        /// </summary>
        bool MoveOut();

        /// <summary>
        /// Method called after the MoveOut method has terminated
        /// </summary>
        bool AfterMovingOut();

        #endregion
    }
}
